package com.jingdianjichi.project.domain.job;

import com.jingdianjichi.project.domain.service.SubjectLikedDomainService;
import com.xxl.job.core.context.XxlJobHelper;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.annotations.Select;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * ClassName:SyncLikedJob
 * Package:com.jingdianjichi.project.domain.job
 * Description:
 *
 * @Author fst
 * @Create 2025/1/14 19:37
 * @Version 1.0
 */
@Component
@Slf4j
public class SyncLikedJob
{

    @Resource
    private SubjectLikedDomainService subjectLikedDomainService;
    @XxlJob("syncLikedJobHandler")
    public void syncLikedJobHandler() throws Exception
    {
        try {
            subjectLikedDomainService.syncLiked();
        }catch (Exception e)
        {
            XxlJobHelper.log("error:"+e.getMessage());
        }
    }
}
